<template>
  <div class="container">
    <button id="emitBtn" data-test="emitBtn" @click="handleClick">
      <slot>默认按钮</slot>
    </button>
  </div>
</template>

<script>
export default {
  name: "Button",
  props:['disabled'],
  methods: {
    handleClick() {
      if (this.disabled) return;
      this.$emit("click");
    }
  },
}
</script>

<style scoped>

</style>